package io.renren.modules.clothingorder.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageData;
import io.renren.modules.clothingorder.dto.ClothingOrderDTO;
import io.renren.modules.clothingorder.entity.ClothingOrderEntity;
import io.renren.modules.clothingorder.vo.ClothingOrderVO;

import java.util.Map;

/**
 * 订单表
 *
 * @author lzy lzy
 * @since 1.0.0 2021-08-30
 */
public interface ClothingOrderService extends IService<ClothingOrderEntity> {

    /**
     * 保存
     * @param clothingOrderDTO
     */
    void save(ClothingOrderDTO clothingOrderDTO);

    /**
     * 修改
     * @param clothingOrderDTO
     */
    void update(ClothingOrderDTO clothingOrderDTO);

    /**
     * 订单--(顾客)报价环节
     * @param dto
     */
    void addOrder(ClothingOrderDTO dto);

    /**
     * 获取登录用户的订单信息
     * @param params
     * @return
     */
    PageData<ClothingOrderVO> getOrderPage(Map<String, Object> params);

    /**
     * 统计已定制订单数量、最多服装类型
     * @param params
     * @return
     */
    JSONObject getStatistics(Map<String, Object> params);

    /**
     * 获取历史订单服装列表
     * @param params
     * @return
     */
    PageData<JSONObject> getHistoryPage(Map<String, Object> params);

    /**
     * 改变订单状态
     * @param id
     * @param status
     */
    void changeStatus(Long id, Integer status);

    /**
     * 设计师上传图稿环节
     * @param dto
     */
    void upDesginerPic(ClothingOrderDTO dto);

}
